import os
import django

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'HuaXianGuan.settings')
django.setup()

from apps.users.models import User

# 查看所有用户
users = User.objects.all()
print("所有用户:")
for user in users:
    print(f"ID: {user.id}, Username: {user.username}, Nickname: {user.nickname}, OpenID: {user.openid}")